import DefaultPage from "@/views/DefaultPage/DefaultPage.vue";

export default [
    {
        path: "/",
        redirect: "/default",
    },
    {
        path: "/default",
        component: DefaultPage,
        meta:{
            isHideBread:true
        }
    },
    {
        path: "/sing",
        // part-one.hashCode.js
        component: () => import(/* webpackChunkName:"part-one" */"@/views/SingFilePage/SingFilePage.vue"),
        meta:{
            breadcrumbs:["单文件组件"],
        }
    },
    {
        path: "/file",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/FileModePage/FileModePage.vue"),
        meta:{
            breadcrumbs:["文件模块"]
        }
    },
    {
        path: "/error",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/ErrorPage/ErrorPage.vue"),
        meta:{
            breadcrumbs:["工程错误和图片资源"]
        }
    },
    {
        path: "/style",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/StylePage/StylePage.vue"),
        meta:{
            breadcrumbs:["样式处理"]
        }
    },
    {
        path: "/build",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/BuildPage/BuildPage.vue"),
        meta:{
            breadcrumbs:["打包操作"]
        }
    },
    {
        path: "/ajax",
        component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/AjaxPage.vue"),
        meta:{
            breadcrumbs:["ajax集成"]
        },
        // 在当前主路由下定义子路由组件
        children: [
            {
                path: "",
                redirect: "/base"
                // redirect:"/ajax/util"
            },
            {
                path: "/base",
                component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/components/BaseUseAxios.vue"),
                meta:{
                    breadcrumbs:["ajax集成","基础使用"]
                }
            },
            {
                path: "/test/module",
                component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/components/ModuleUseAxios.vue"),
                meta:{
                    breadcrumbs:["ajax集成","模块化异步请求方法"]
                }
            },
            {
                path: "util",
                component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/components/UtilUseAxios.vue"),
                meta:{
                    breadcrumbs:["ajax集成","工具化的统一处理"]
                }
            },
            {
                path: "test/proxy",
                component: () => import(/* webpackChunkName:"ajax-group" */"@/views/AjaxPage/components/AjaxUseProxy.vue"),
                meta:{
                    breadcrumbs:["ajax集成","代理服务器的启动和定义使用"]
                }
            },
            {
                path: ":errorPath(.*)*",
                component: () => import(/* webpackChunkName:"ajax-group" */"@/views/NotFound/NotFound.vue"),
                meta:{
                    breadcrumbs:["ajax集成"]
                }
            }
        ]
    },
    {
        path: "/route",
        component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/RoutePage.vue"),
        meta:{
            breadcrumbs:["路由模块"]
        },
        children: [
            {
                path: "",
                redirect: "/route/link"
            },
            {
                path: "link",
                component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/components/RouterLinkView.vue"),
                meta:{
                    breadcrumbs:["路由模块","RouterLink的使用"]
                },
            },
            {
                path: "path",
                component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/components/RouterPathView.vue"),
                meta:{
                    breadcrumbs:["路由模块","路由嵌套&路由地址&路由懒加载"]
                },
            },
            {
                path: "model",
                component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/components/RouterModeView.vue"),
                meta:{
                    breadcrumbs:["路由模块","路由模式"]
                },
            },
            {
                path: "route",
                component: () => import(/* webpackChunkName:"route-group" */"@/views/RoutePage/components/RouterRouteView.vue"),
                meta:{
                    breadcrumbs:["路由模块","激活信息"]
                },
            },
            {
                path: ":errorPath(.*)*",
                component: () => import(/* webpackChunkName:"route-group" */"@/views/NotFound/NotFound.vue"),
                meta:{
                    breadcrumbs:["路由模块"]
                },
            }
        ]
    },
    {
        path: "/element",
        component: () => import(/* webpackChunkName:"part-one" */"@/views/ElementUIPage/ElementUIPage.vue"),
        meta:{
            breadcrumbs:["ElementUI使用"]
        },
    },
    // {
    //     path:"/:errorPath(.*)*",
    //     redirect:"/default"
    // }
    {
        path: "/:errorPath(.*)*",
        component: () => import(/* webpackChunkName:"not-found" */"@/views/NotFound/NotFound.vue"),
        meta:{
            breadcrumbs:["资源丢失"]
        },
    },
]